<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='../../vue.js'></script>
    <style>
        .public{
            width: 100px;
            height: 100px;
        }
        .active{
            background-color: aqua;
        }
        .noActive{
            background-color: pink;
        }
        .red{
            color: red;
        }

        .bold{
            font-weight: bold;
        }
        .itatic{
            font-style: italic;
        }
    </style>
</head>

<body>
    <div id='app'>
        <div class="public" :class="isActive?'active':'noActive'">Vue1</div>
        <br>
        <div :class="fontColorClass">Vue2</div>
        <br>
        <div :class="box3Class">Vue3</div>
        <br>
        <div :class="{red:isRed,bold:isBold,itatic:isItatic}">Vue4</div>
        <div :class="classArr">Vue5</div>
    </div>
    <script>
        Vue.config.productionTip = false;
        const vm = new Vue({
            el: '#app',
            data() {
                return {
                    isActive:true,
                    fontColorClass:'red',
                    box3Class:{
                        red:true,
                        bold:true,
                        itatic:true
                    },
                    isRed:true,
                    isBold:true,
                    isItatic:true,
                    classArr:['red','bold']
                }
            }
        })
    </script>
</body>

</html>